package com.gowants.pems.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.gowants.pems.model.SysUser;

public interface SysUserMapper {
	
	/** 
	 * <新增>
	 * @param ScmsUserController
	 * @return
	 */
	public int save(@Param("record")SysUser user);
	
	/**
	 * <删除>
	 * @param code
	 * @return
	 */
	public int delete(@Param("id")String code);
	
	/**
	 * <修改>
	 * @param ScmsUserController
	 * @return
	 */
	public int update(@Param("record")SysUser user);
	
	/**
	 * <编码查询唯一>
	 * @param id
	 * @return
	 */
	public SysUser selectOne(@Param("id")String id);
	
	
	///根据登录名称查询
	public SysUser selectUserName(@Param("userName")String userName);
	
	/**
	 * 查询
	 * @param user
	 * @return
	 */
	public List <SysUser> select(@Param("record")SysUser user);
	/**
	 * 修改验重
	 * @param user
	 * @return
	 */
	public int selectRepetition(@Param("record")SysUser user);
	
	public int selectByPhoneCount(@Param("record")SysUser user);
	
	public SysUser getIdByUserName(@Param("userName") String userName);
	
	public List <SysUser> login(@Param("record")SysUser user);

	/**
	 * 删除检查是否有人员
	 * @param id
	 * @return
	 */
	public int delCheckByDepId(@Param("id")String id);

	public List<SysUser> getInfoByCard(@Param("card")String card);

	/**
	 * 根据 部门ID 获取用户
	 * @param
	 * @return
	 */
	public List<SysUser> selectUserByDepartment(Map<String,Object> paramMap);

	/**
	 * 黑名单加入
	 * @param list
	 * @return
	 */
	int addBlackList(List<String> list);

	/**
	 * 解除黑名单
	 * @param id
	 * @return
	 */
	int  removeBlackList(String id);

	List<SysUser> getUserByDepartmentId(@Param("departmentId") String departmentId);

	List<SysUser> getUserByDepartmentIdNew(@Param("record")SysUser user);
	
	/**
	 * 根据 userId 检索
	 * @param userId
	 * @return
	 */
	List<SysUser> loginSelect(String userId);
}
